#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
"""
@File        :   settings.py.py    
@Contact     :   18574945291@163.com
@License     :   (C)Copyright 2018-20xx, Liugroup-NLPR-CASIA
@Modify Time :   2020/12/10 10:49
@Author      :   code_wizard 1978992154@qq.com
"""


class _const:
    class ConstError(TypeError):
        pass

    class ConstCaseError(ConstError):
        pass

    def __setattr__(self, key, value):
        if self.__dict__.has_key(key):
            raise self.ConstError("Can't change const.%s" % key)
        if not key.isupper():
            raise self.ConstError("const name '%s' is not all uppercase " % key)
        self.__dict__[key] = value


import sys
sys.modules[__name__] = _const